<?php

namespace app\services;

use think\facade\Cookie;

class CookieService
{
    public static function setCookie()
    {
        // 设置Cookie 有效期为 3600秒 * 24 * 365 * 5 5年有效
        Cookie::set('authentication', env('auth.authentication'), 3600 * 24 * 365 * 5);
        return true;
    }

    public static function getCooKie()
    {
        return Cookie::get('authentication');
    }
}